package com.ethink.framework.common.validate.annotation;

import com.ethink.framework.common.validate.impl.IsEmailValidatorImpl;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * 邮箱地址格式是否正确
 *
 * @author name(mobile)
 */

@Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = IsEmailValidatorImpl.class)
public @interface IsEmail {

    String message() default "邮箱地址格式非法";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}